package com.ljh.mybatis.service;


import com.github.pagehelper.PageInfo;
import com.ljh.mybatis.entity.Department;

import java.util.List;

/**
 * (Department)表服务接口
 *
 * @author makejava
 * @since 2020-11-09 19:03:44
 */
public interface DepartmentService   {
    //通过id查询单条数据
    Department queryById(Integer id);
    //查询所有数据
    List<Department> selectAll();
    //根据id删除数据
    boolean deleteUserById(Integer id);
    //根据ids删除数据
    boolean deleteUserByIds(Integer[] ids);
    //新增
    boolean addUser(Department department);
    //根据id更新
    boolean updateById(Department department);

    //多表联合查询
    List<Department> selectMore();

    //使用mybatis实现递归查询
    List<Department> selectD2();

    //使用PagerHelper完成分页查询
    PageInfo<Department> pageListDep(int page, int limit);
    //根据条件查询，动态sql(if)
    List<Department> getDepCondition(Department department);
}